﻿using System;
using System.Collections.Generic;
using Nop.Core;
using Nop.Core.Domain.Advert;

namespace Nop.Services.Advert
{
    public partial interface IAdvertisementService
    {
        #region Advertisemen         
        /// <summary>
        /// 删除广告（记为无效，不直接物理删除）
        /// </summary>
        /// <param name="Item"></param>
        void DeleteAdvertisement(Advertisement Item);         
        /// <summary>
        /// 根据ID获取广告信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Advertisement GetAdvertisementById(int Id);
        /// <summary>
        /// 分页获取所有的广告信息
        /// </summary>
        /// <param name="languageId"></param>
        /// <param name="dateFrom"></param>
        /// <param name="dateTo"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="showHidden"></param>
        /// <returns></returns>
        IPagedList<Advertisement> GetAllAdvertisement(DateTime? dateFrom, DateTime? dateTo, int pageIndex, int pageSize, bool showHidden = false);         
        /// <summary>
        /// 插入新的广告
        /// </summary>
        /// <param name="Item"></param>
        void InsertAdvertisement(Advertisement Item);
        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="Item"></param>
        void UpdateAdvertisement(Advertisement Item);
        /// <summary>
        ///  获取指定的广告类型下，最新的指定条数的广告
        /// </summary>
        /// <param name="languageId"></param>
        /// <param name="pagesize"></param>
        /// <param name="adtype"></param>
        /// <param name="showHidden"></param>
        /// <returns></returns>
        IPagedList<Advertisement> GetNewAdvertisement(int pageSize, int adtype, bool showHidden = false);
        /// <summary>
        /// 获取已经开始生效，并且未结束的广告
        /// </summary>
        /// <param name="pagesize"></param>
        /// <param name="adtype"></param>
        /// <param name="adlevel"></param>
        /// <param name="showHidden"></param>
        /// <returns></returns>
        IList<Advertisement> GetAdvertisement(int pageSize, int adtype, int adlevel, bool showHidden = false);

        IList<Advertisement> GetAdvertisement(int pageSize, int adtype,int adposition, int adlevel, bool showHidden = false);
        #endregion        
        
    }
}
